[Bug] Fix four CI workflow defects: laptop-only path, unscoped pytest, unbounded test job, py3.9 release build (#1798) - #1812
Conversation
|
Hello there, thank you for opening an PR ! 🙏🏻 The team was notified and they will get back to you asap. |
|
Correction to this PR's body, found while reading fresh CI logs on #1815. I wrote that scoping pytest via
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fiSo The missing line is one more in the same step: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ pip install -e .I have not pushed that, since it is a fifth change and this PR was already scoped to the four in #1798. Say the word and I will add it here, or send it separately. Everything else in the PR stands as written. |
914dcef to
2b56c45
Compare
|
Rebased onto
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# The tests import swarms, so the package under test has to be installed.
python -m pip install -e . --no-deps
Verified in a clean 3.12 venv, mirroring the job's ordering:
All five defects re-confirmed present on
Master's own latest run on |
|
CI result on this push, which is the first time this workflow has actually reached its tests. Before: the job died at step 7, Install dependencies, on Now (run 31302007581): So the two defects this PR targets in that workflow are confirmed fixed against real CI: the install step completes, and the removed The job is still red, and it is worth being precise about why — it is not this PR, and it is not something this PR claims to fix. All remaining failures are one cause: That string appears 1472 times in the log. The failing tests are That is a fifth, separate defect: either the secret needs configuring on the repo, or those 4 tests need to skip when no key is present. I have deliberately not folded it into this PR — the first is a repo-settings change only a maintainer can make, and the second changes test semantics rather than CI plumbing. Happy to open it as its own PR if you would like the skip-guard; say the word and I will. For this PR the claim is narrower and now evidenced: the workflow goes from never executing to executing and reporting 14/18. |
|
Build-job result, and one more line pushed. The package-install fix works. All three matrix legs now report: No But the job is still red, for a new reason that only became visible once it got this far. It runs to 29% and then stops emitting for fifteen minutes: Exit 143 is SIGTERM — the runner killed it. That is the same defect this PR already fixes in build:
runs-on: ubuntu-latest
+ timeout-minutes: 20
strategy:
fail-fast: falseTo be clear about what this does and does not buy: it does not turn the job green. It makes it fail in a bounded, legible way instead of hanging for 17 minutes, which is the whole point of the defect. The Net for this PR: five workflow defects fixed, all five re-confirmed present on |
6b22170 to
dc925ed
Compare
|
Rebased onto current master so this is clean against HEAD. Flagging the blast radius, since this has been sitting a little while and reads like minor cleanup. The The cause is the thing this PR fixes. The job installs The unscoped collection has a second edge to it: So Happy to split the release-workflow and timeout bits into their own PR if you would rather review the pytest fix on its own, just say the word. apologize if i missed something obvious here, i traced it from the failing job logs and checked master's own run history to be sure it wasn't just my branch. freshman in college, still learning my way around CI, so corrections very welcome :) |
…, unbounded test job, py3.9 release build]
…an import swarms]
dc925ed to
4f23234
Compare
|
Rebased on today's master. Bumping this one because it is the reason every other PR in the repo shows red, and I can now point at the exact failure. Master's own Two separate defects produce that, and this PR fixes both:
Measured locally on master vs this branch, running exactly what CI runs: Locally only 14 example files error because my venv has swarms installed; on the runner it is all 106. Both counts go to zero with this change. The other two hunks are the same class of thing:
Nothing here touches library code — five workflow/config lines. Worth landing ahead of my other PRs, since right now a green signal is impossible for any of them and the failures are indistinguishable from real ones. |
Fixes #1798
Four one-line-ish fixes, 4 files, +5/-4 total. Taking them in one PR as the issue suggests, since four separate PRs for four YAML lines would be noise.
1.
test-main-features.ymlcds into a laptop-only path, and dies before it--no-devwas removed in Poetry 2.x, so the job died at install withThe option "--no-dev" does not existbefore ever reaching thecd.--only main,testis the modern equivalent of "main plus the test group, no dev". Thecdtargeted a path that exists on one developer's machine, and the step already runs in the checkout, so deleting the line is the whole fix.The
test-coveragejob at line 138 uses plainpoetry install --with test, which is still valid in Poetry 2.x, so I left it alone.2. Bare
pytestcollectsexamples/andscripts/Fixed in
pyproject.tomlrather than in the workflow:[tool.pytest.ini_options] +testpaths = ["tests"]One line, and it makes bare
pytestcorrect everywhere, in CI and on a contributor's laptop, instead of only inpython-package.yml. So that workflow needs no edit at all. There are currently 51test_*.py/*_test.pyfiles underexamples/andscripts/, which is what produced the collection errors in the run log.Proof of the mechanism, in a scratch tree so nothing in this repo is imported: a file outside
tests/that raises at import.Note this is complementary to #1809, not a replacement:
testpathsstops collection outsidetests/, buttests/structs/test_agent_stream_token.pylives insidetests/and still issues a billed live LLM call at import until that one is moved.3.
tests.ymlruns unboundedtest: runs-on: ubuntu-latest + timeout-minutes: 20The most recent run hit 17m35s and ended with
The runner has received a shutdown signal. This bounds it.I did not do the other half of that item. Wiring provider secrets into
tests.yml, or marking the roughly 40 test files that reach a live provider so they skip without credentials, is a real design decision about whether this workflow is meant to hit live providers at all, and it is much larger than a timeout. Tell me which way you want it and I will send that separately.4.
RELEASE.ymlbuilds on Python 3.9pyproject.tomldeclarespython = ">=3.10,<4.0", so the release build was running on an interpreter the package excludes.Checks
All three touched workflow files parse under
yaml.safe_load, andtests.yml's job now reportstimeout-minutes: 20. No test for this one: these are workflow and config changes, and the honest verification is the next CI run on this PR.I use Claude Code to help me work through these and I check every claim against the files before opening anything. If you would rather have these as four separate PRs, say so and I will split it.
🤖 Generated with Claude Code